package object;

public class ObjectDemo {
    public static void main(String[] args) {
        /*
        Point p=new Point(100,200);
        System.out.println(p);
        System.out.println(p.toString());

        String str="这是:"+p;
        System.out.println(str);
         */
        /*
        Point o1=new Point(100,200);
        Point o2=new Point(100,200);
        System.out.println(o1==o2);
        System.out.println(o1.equals(o2));
         */
        String o1=new String("abc");
        String o2=new String("abc");
        System.out.println(o1.equals(o2));

        StringBuilder f1=new StringBuilder("abc");
        StringBuilder f2=new StringBuilder("abc");
        System.out.println(f1.equals(f2));

        System.out.println(o2.equals(f1));
    }
}